#include <string.h>
#include <stdio.h>
#include "app/app_runner.h"
#include "daemon/daemon_runner.h"
#include "ota/ota_runner.h"

int main(int argc, char const *argv[])
{
    if (argc < 2)
    {
        printf("Usage: ./main.c <app|daemon|ota>\n");
        return -1;
    }

    if (strcmp(argv[1], "app") == 0)
    {
        // 运行app主逻辑
        app_runner_run();
    }
    else if (strcmp(argv[1], "daemon") == 0)
    {
        // 运行daemon主逻辑
        daemon_runner_run();
    }
    else if (strcmp(argv[1], "ota") == 0)
    {
        // 运行ota主逻辑
        ota_runner_run();
    }
    else
    {
        printf("Usage: ./main.c <app|daemon|ota>\n");
        return -1;
    }

    return 0;
}
